
import React from 'react'


import './index.scss'
import { Transition } from '../Transition'

export interface IOverlayProps {
    visible?: boolean
    duration?: number
    zIndex?: number
    name?: string
    onClick?: ()=> void


}

export const Overlay: React.FC<IOverlayProps> = ({
    children,
    zIndex = 10000,
    duration,
    visible,
    onClick
    
    // name

}) => {

    return (
        <Transition
            customClass="xxm-ls-overlay"
            csutomStyle={{
                zIndex,
            }}
            visible={visible}
            duration={duration}
            name="slide"
            onClick={onClick}
        >
            {children}
        </Transition>
    )
}